qtbase-opensource-src.git
5 years agoAvoid use-after-free in QXcbConnection::initializeScreens()
Debian Qt/KDE Maintainers [Mon, 23 Nov 2020 18:16:00 +0000 (18:16 +0000)]
Avoid use-after-free in QXcbConnection::initializeScreens()

Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=86b8c5c3f32c2457
Last-Update: 2020-11-23

Gbp-Pq: Name xcb_screens_uaf.patch

5 years agoask clone() to use the SIGCHLD as the termination signal
Debian Qt/KDE Maintainers [Mon, 23 Nov 2020 18:16:00 +0000 (18:16 +0000)]
ask clone() to use the SIGCHLD as the termination signal

Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=a82032351c921c3d
Last-Update: 2020-11-19

Because of these lines in the Linux kernel (kernel/fork.c, see [1][3]):

    if (clone_flags & CLONE_VFORK)
        trace = PTRACE_EVENT_VFORK;
    else if (args->exit_signal != SIGCHLD)
        trace = PTRACE_EVENT_CLONE;
    else
        trace = PTRACE_EVENT_FORK;

Without CLONE_VFORK (which we can't use), if the exit signal isn't
SIGCHLD, the debugger will get a PTRACE_EVENT_CLONE, which makes it
think the process we're starting is a thread, not a new process. Both
gdb and lldb remain attached to the child and when it later performs an
execve(), they get mightily confused. See gdb bug report[5].

The idea of not having an exit_signal was so that no SIGCHLD would be
delivered to the parent process in the first place. That way, some
misguided SIGCHLD handler (*cough* GLib *cough*) wouldn't reap our
processes. Unfortunately, what I didn't realize was that the kernel
sends SIGCHLD anyway (see [2][4]), so this defensive measure didn't
actually work. Consequently, we can pass SIGCHLD to clone() and get the
debuggers working again.

[1] https://code.woboq.org/linux/linux/kernel/fork.c.html#_do_fork
[2] https://code.woboq.org/linux/linux/kernel/signal.c.html#do_notify_parent
[3] https://elixir.bootlin.com/linux/v5.8/source/kernel/fork.c#L2432
[4] https://elixir.bootlin.com/linux/v5.8/source/kernel/signal.c#L1925
[5] https://sourceware.org/bugzilla/show_bug.cgi?id=26562

Gbp-Pq: Name clone_sigchld.diff

5 years agoemit QScreen::geometryChanged when the logical DPI changes
Debian Qt/KDE Maintainers [Mon, 23 Nov 2020 18:16:00 +0000 (18:16 +0000)]
emit QScreen::geometryChanged when the logical DPI changes

Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=5c7307775d32ae0a
Last-Update: 2020-09-30

Add the missing call to QScreenPrivate::emitGeometryChangeSignals()
along with an emission of physicalDotsPerInchChanged()
since that is calculated from geometry and physical size.

Rearrange the code in
QGuiApplicationPrivate::processScreenGeometryChange()
to prevent duplicate emissions of geometryChanged(),
physicalDotsPerInchChanged() which this change would introduce.

Gbp-Pq: Name emit_geometry_changed.diff

5 years agoqtbase-opensource-src (5.15.1+dfsg-4) unstable; urgency=medium
Lisandro Damián Nicanor Pérez Meyer [Mon, 23 Nov 2020 18:16:00 +0000 (18:16 +0000)]
qtbase-opensource-src (5.15.1+dfsg-4) unstable; urgency=medium

  [ Alexander Volkov ]
  * Backport upstream patch xcb_screens_uaf.patch in order to fix
    use-after-free in the xcb plugin.

[dgit import unpatched qtbase-opensource-src 5.15.1+dfsg-4]

5 years agoImport qtbase-opensource-src_5.15.1+dfsg-4.debian.tar.xz
Lisandro Damián Nicanor Pérez Meyer [Mon, 23 Nov 2020 18:16:00 +0000 (18:16 +0000)]
Import qtbase-opensource-src_5.15.1+dfsg-4.debian.tar.xz

[dgit import tarball qtbase-opensource-src 5.15.1+dfsg-4 qtbase-opensource-src_5.15.1+dfsg-4.debian.tar.xz]

5 years agoImport qtbase-opensource-src_5.15.1+dfsg.orig.tar.xz
Dmitry Shachnev [Thu, 10 Sep 2020 11:41:18 +0000 (12:41 +0100)]
Import qtbase-opensource-src_5.15.1+dfsg.orig.tar.xz

[dgit import orig qtbase-opensource-src_5.15.1+dfsg.orig.tar.xz]